# Created with PyCharm.
# Coding UTF-8
# @Version Python 3.8

# @author GeekChunky
# @Email caiyoupeng00@outlook.com

# @Date 2021/12/08
# @CreatTime 17:10


'''
Documentation comments:
    跳转单独页面
'''

# Now Write Down Your Python Code in Editor...
# Wish You Happy Everyday !
from selenium import webdriver

driver = webdriver.Edge(r'C:\Users\caiyo\AppData\Local\Programs\Python\Python38\BroswerDriver\msedgedriver.exe')
driver.maximize_window()
driver.get('https://www.bilibili.com/')
driver.implicitly_wait(30)
driver.find_element_by_xpath('//*[@id="internationalHeader"]/div[1]/div/div[3]/div[2]/span[1]/div/span/div').click()
driver.implicitly_wait(30)
windows = driver.window_handles
driver.switch_to.window(windows[1])
driver.find_element_by_xpath('//*[@id="login-username"]').send_keys('test')
